/*
 * vCLDART.h
 *
 *  Created on: May 22, 2011
 *      Author: ulas
 */

#ifndef VCLDART_H_
#define VCLDART_H_

#include "common/sys.h"
#include "common/CL_Common.h"

typedef struct
{
	U16 slots[DART_MAX_ADO_SLOTS];					//length parametric && <= cyc
	U8  num;										//total number of slots
	DEVICE_CHANNEL_TYPE used;						//must be updated with the gUpdate() function
}ado_TYPE;


class vCLDART {
private:

public:
	U16 cyc;  		//total number of slots
	U16 cnt;		//current slot counter

	/*Allocation Data Object related parameters*/
	U8 numberOfAdos;		               //total number of Allocation Data Object
	ado_TYPE alloc[DART_MAX_ADO_COUNT];       //maximum ado count

	vCLDART();

	STATUS initialize_vCL();
	STATUS addAdo(ado_TYPE* ado);
	STATUS setAllocUsed(U8 allocIndex, DEVICE_CHANNEL_TYPE Device_Channel);
	virtual ~vCLDART();
};

#endif /* VCLDART_H_ */
